// import { request } from '@umijs/max';
import request, { extend } from 'umi-request';
// import { extend } from 'umi-request';


const res = extend({
  prefix: "/api",
  timeout: 1000,
  headers: {
    "Content-Type": "application/json"
  },

});
//采购一级菜单
export async function tabsType() {
  const res1 = await res('/menu/getFirst', { method: 'get' })
  return res1
}
//采购二级菜单
export async function tabThird(body: any) {
  const res2 = await res(`/menu/getMenu/${body}`, { method: 'post', data: body })
  return res2
}
//搜索框数据获取
export async function tabsquery(body: any) {
  const res3 = await res(`/menu/getList/{menuName}`, { method: 'post', data: body })
  return res3
}
//供应大厅-菜单查询
export async function getList(body: string) {
  const res1 = await res(`/menu/getList/${body}`, { method: 'post', data: {menuName:body} })
  return res1
}
export async function getsp(body: any) {
  const res1 = await res(`/commodityOrder/getBySupplierId`, { method: 'get', params:body })
  return res1
}
export async function getgy(body: any) {
  const res1 = await res(`/commodityInformation/getInformation`, { method: 'post', data:body })
  return res1
}
export async function getcg(body: any) {
  const res1 = await res(`/commodityInformation/getStatusQuery`, { method: 'post', data:body })
  return res1
}
export async function getcd(body: any) {
  const res1 = await res(`/commodityInformation/addCommodity`, { method: 'post', data:body })
  return res1
}
